package com.example.base.demo.sp;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Component
@Order(2)
public class AddressInitializerApplicationRunner implements ApplicationRunner {

    @Value("${server.port}")
    String port;

    @Override
    public void run(ApplicationArguments args) {
        System.out.println("应用访问地址：http://localhost:" + port);
    }
}
